home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DTP / DTP_TEX / H220.ZIP / ITRNS211.ZIP / SRC / MAKEFILE.UNX < prev    next >
Text File  |  1991-10-14  |  5KB  |  183 lines

  1. #   Makefile for itrans
  2. #$Header: e:/itrans/src/rcs/makefile.unx 1.1 91/10/14 19:46:23 avinash Exp $
  3. #   This is for UNIX machines.
  4. #   There are separate makefiles for UNIX and MSDOS systems...
  5. #
  6. # change all defines as required.
  7.  
  8. SHELL=/bin/sh
  9.  
  10. ####### 
  11. # Note that a shell environment variable has to be defined, called
  12. # ITRANSPATH.
  13. # A sample value for it is:
  14. # ITRANSPATH=$(HEADERPATH):$(TFMDIR), where HEADERPATH and TFMDIR
  15. # will be defined further down in this makefile....
  16. ####### 
  17.  
  18. ####### 
  19. # If you do not have a compiler that understands new-style function
  20. # declarators, make the "noansi" object, instead of "itrans" or "all".
  21. # IMPORTANT: Also, make the variable PROTO be null.
  22. ####### 
  23.  
  24. # for SYSV (and friends which use <string.h> instead of <strings.h>)
  25. # define the c-compiler flag
  26. SYS = -DSYSV
  27.  
  28. # if your C compiler understands prototypes, define PROTO_C,
  29. # else keep PROTO null
  30. # PROTO =
  31. PROTO=-DPROTO_C=1 -DYY_USE_PROTOS
  32.  
  33. # where the installed binary goes
  34. BINDIR = /usr1/avinash/ITRANS/bin
  35.  
  36. # where the TFM, and IFM files go
  37. # TFMDIR = /usr/lib/tex/fonts/tfm
  38. TFMDIR = /usr1/avinash/ITRANS/lib
  39.  
  40. # where the header PS files go
  41. # HEADERDIR = /usr/lib/tex/ps
  42. HEADERDIR= /usr1/avinash/ITRANS/lib
  43.  
  44. # where the manual page goes
  45. # MANDIR = /usr/local/text/man/man1
  46. MANEXT = 1
  47. MANDIR = /usr1/avinash/ITRANS/doc
  48.  
  49. # code optimizer
  50. # either use
  51. # OPT = -O2
  52. # OPT = -g
  53. OPT =
  54.  
  55. # libraries to include (-ll -lm -lc on most systems)
  56. # Note, if you do not have lex/yacc on your system, turn off the
  57. # -ll flag. You will also need to modify the dependencies of
  58. # ilex.o and iyacc.o, check out the comments further down this file
  59. # (look for ilex.o and iyacc.o)
  60. # FLIBS= -lmalloc -ll -lm -lc # Use this for SGI machines
  61. FLIBS= -lm -lc -ll
  62. # FLIBS= -lm -lc # Use this for machines missing lex/yacc tools
  63.  
  64. # C flags to use:
  65. # SGI: -acpp use ANSI C prepreocessor, -prototypes, honor prototypes.
  66. # CFLAGS = -acpp -prototypes $(OPT) $(SYS) $(PROTO)
  67. CFLAGS = $(OPT) $(SYS) $(PROTO) # safe....
  68.  
  69. CC=cc
  70.  
  71. # Yacc flags:
  72. YFLAGS= -d
  73.  
  74. ###
  75.  
  76. SRC =    iyacc.y \
  77.     ilex.l \
  78.     itrans.c \
  79.     lang.c \
  80.     font.c \
  81.     pifm.c \
  82.     ichar.c \
  83.     itotex.c \
  84.     itops.c \
  85.     utils.c
  86.  
  87. OBJ =    iyacc.o \
  88.     ilex.o \
  89.     itrans.o \
  90.     lang.o \
  91.     font.o \
  92.     pifm.o \
  93.     ichar.o \
  94.     itotex.o \
  95.     itops.o \
  96.     utils.o
  97.  
  98. HEADERFILES = devnac.ps itrans.pro
  99. FILES = 
  100.  
  101. .c.o:
  102.     $(CC) -c $(CFLAGS) $<
  103.  
  104. all : itrans
  105.  
  106. itrans: $(OBJ)
  107.     $(CC) -o itrans $(OBJ) $(FLIBS)
  108.  
  109. $(OBJ) : itrans.h imap.h ifm.h
  110.  
  111. # .l.c:;
  112. # If you do not have lex on your system, uncomment the following
  113. # four lines (you may leave the .l.c line above as it is)
  114. # Also, comment out the ilex.c that follows this defn (the PC related stuff).
  115. # (it may already be commented....)
  116. #---
  117. # ilex.o : ilex.c ytab.h
  118. #     $(CC) -c $(CFLAGS) -DNOLEX ilex.c
  119. # ilex.c : lexyyc
  120. #     cp lexyyc ilex.c
  121.  
  122. # PC related stuff, or, edit this if you use a non-standard lex..
  123. # ilex.c : ilex.l
  124. #     flex ilex.l
  125. #     mv lexyy.c ilex.c
  126.  
  127. # .y.c:;
  128. # If you do not have yacc on your system, uncomment the following
  129. # four lines (you may leave the .y.c:; line above as it is).
  130. # Also, comment out the iyacc.c that follows this defn (the PC related stuff).
  131. # (it may already be commented....)
  132. #---
  133. # iyacc.o : iyacc.c
  134. #     $(CC) -c $(CFLAGS) iyacc.c
  135. # iyacc.c : ytabc 
  136. #     cp ytabh y.tab.h
  137. #     cp ytabc iyacc.c
  138.  
  139. # PC related stuff, or, edit this if you use a non-standard yacc..
  140. # iyacc.c : iyacc.y 
  141. #     byacc -d iyacc.y
  142. #     mv y_tab.c iyacc.c
  143.  
  144. # When making noansi, make sure PROTO is null
  145. noansi : deansify $(SRC)
  146.     $(SHELL) dodeans
  147.     touch noansi
  148.     echo "Make sure the variable PROTO <$(PROTO)> is NULL in the Makefile!"
  149.     make all
  150.  
  151. deansify:    deansify.c
  152.     $(CC) $(CFLAGS) deansify.c -o deansify
  153.  
  154. install : all
  155.     -mkdir $(BINDIR)
  156.     -mkdir $(HEADERDIR)
  157.     -mkdir $(MANDIR)
  158.     cp itrans $(BINDIR)/itrans
  159.     cp prips $(BINDIR)/prips
  160.     -cp ../lib/itrans.pro $(HEADERDIR)
  161.     -cp ../lib/devnac.ps $(HEADERDIR)
  162.     -cp ../lib/devnac.ifm $(TFMDIR)
  163.     -cp ../lib/devnac.afm $(TFMDIR)
  164.     -cp ../lib/dnh.tfm $(TFMDIR)
  165.     -cp ../lib/dnho.tfm $(TFMDIR)
  166.     -cp ../lib/dnhrc.tfm $(TFMDIR)
  167.     -cp ../lib/dnhre.tfm $(TFMDIR)
  168.     -chmod +w $(MANDIR)/itrans.$(MANEXT)
  169.     -cp itrans.1 $(MANDIR)/itrans.$(MANEXT)
  170.     -chmod -w $(MANDIR)/itrans.$(MANEXT)
  171.     -(cd $(MANDIR); nroff -man itrans.$(MANEXT) > itrans.man)
  172.     -chmod +w $(MANDIR)/prips.$(MANEXT)
  173.     -cp prips.1 $(MANDIR)/prips.$(MANEXT)
  174.     -chmod -w $(MANDIR)/prips.$(MANEXT)
  175.     -(cd $(MANDIR); nroff -man prips.$(MANEXT) > prips.man)
  176.     @echo
  177.     @echo "****** Note: There may be error messages printed when installing,"
  178.     @echo "******       most of them will be harmless---directories already existing, or "
  179.     @echo "******       copying a file onto itself."
  180.  
  181. clean :
  182.     rm -f *.o *.log
  183.